package com.neusoft.databus.core.service;

import java.util.List;

import javax.servlet.http.HttpServletResponse;

import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import com.neusoft.bizcore.web.support.Searchable;
import com.neusoft.databus.common.dto.GatewayDTO;

/**
 * description
 *
 * @author sunchf
 * @date 2018年12月21日 下午4:25:46
 */
public interface GatewayService {
    GatewayDTO get(long id);

    GatewayDTO findByCode(String code);

    GatewayDTO findByCodeWithResources(String code);

    List<GatewayDTO> search(Searchable searchable);

    Page<GatewayDTO> search(Pageable pageable, Searchable searchable);

    GatewayDTO create(GatewayDTO dto);

    GatewayDTO update(String code, GatewayDTO dto);

    void delete(String code);

    void enable(String code);

    void disable(String code);

    void importTpl(MultipartFile excel);

    SXSSFWorkbook getTpl();

    void export(final Searchable searchable, final Pageable pageable, final HttpServletResponse response);

    List<GatewayDTO> findAllEnabledAndPulled(int node);

    void batch(String code, boolean batched);
}
